package com.csw.flink.transformation

import org.apache.flink.streaming.api.scala._

object Demo07Union {
  def main(args: Array[String]): Unit = {

    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment


    env.setParallelism(1)

    val ds1: DataStream[Int] = env.fromCollection(List(1,2,3,4,5,6))

    val ds2: DataStream[Int] = env.fromCollection(List(7,8,9,10,11,12))

    /**
      * union:合并ds
      *
      */

    val ds3: DataStream[Int] = ds1.union(ds2)

    ds3.print()

    env.execute()
  }
}
